package com.dkm.ou.me.repository.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.base.db.persistence.dao.IQueryDao;
import com.dkm.biz.repository.AbstractRepository;
import com.dkm.ou.me.domain.RoleGrant;
import com.dkm.ou.me.persistence.dao.RoleGrantQueryDao;
import com.dkm.ou.me.persistence.entity.RoleGrantPo;
import com.dkm.ou.me.repository.RoleGrantRepository;

/**
 * 对象功能:角色授予 Repository接口的实现类
 * 开发公司:SKG.COM
 * 开发人员:蔡东渠
 * 创建时间:2015-01-20 10:23:19
 */
@Repository
public class RoleGrantRepositoryImpl extends AbstractRepository<String, RoleGrantPo,RoleGrant> implements RoleGrantRepository{
	  
	@Resource
	private  RoleGrantQueryDao roleGrantQueryDao;

	public RoleGrant newInstance() {
		RoleGrantPo po = new RoleGrantPo();
		RoleGrant roleGrant = SpringHelper.getBean(RoleGrant.class);
		roleGrant.setData(po);
		return roleGrant;
	}

	public RoleGrant newInstance(RoleGrantPo po) {
		RoleGrant roleGrant = SpringHelper.getBean(RoleGrant.class);
		roleGrant.setData(po);
		return roleGrant;
	} 
	
	@Override
	protected IQueryDao<String, RoleGrantPo> getQueryDao() {
		return roleGrantQueryDao;
	}
	
}
